home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Utilities Professional 1-1500
/
Utilities Professional 1-1500 (1994)(WPD)[!].iso
/
00010250
/
var0088.dms
/
var0088.adf
/
Guardian.doc
< prev
next >
Wrap
Text File
|
1988-03-04
|
11KB
|
215 lines
************************************************************************
* GUARDIAN v1.1 *
* Antivirus Bootstrap *
* Copyright 1988 by Leonardo Fei, via A. Fava 6, 20125 Milano, Italy *
* *
* IMPORTANT NOTE: This program is freely copyable and distributable. *
* It is NOT Public Domain. All rights are reserved by the author. *
* You may give copies of this program to anyone you wish but you may *
* not sell it. This program is NOT to be published on any Italian *
* 'magazine+disk', not even as a 'sample' or 'demo'. *
* *
************************************************************************
Guardian is an antivirus program I wrote on impetus in a few days, after
I discovered that a new virus had infected most of my disks.
Guardian does not steal even a single cycle of the machine's time,
because it's called only during boot.
While the other antivirus programs are tuned on a particular version or
family of viruses, Guardian recognize any not-standard bootblock. With
'standard bootblock' I mean a bootblock created by the Workbench INSTALL
command. This standard bootblock is contained into the Guardian code.
Guardian installs itself in place of the bootstrap module, and examine
the contents of each bootblock by comparing it with the standard one,
BEFORE it is actually executed.
"WARNING !!! - THIS IS NOT A STANDARD BOOTBLOCK !!!"
----------------------------------------------------
If the bootblock code differs even by a single byte, an alert is
displayed to warn the user of the possible threat contained in the
bootcode, and an ASCII view of the suspect bootblock is given, to help
you in recognizing it. You may recognize a virus by text strings such
as 'SCA!SCA!SCA!' or 'VIRUS BY BYTE BANDIT', but remember that there are
also anonymous viruses around, without a single message into them.
So, always be very careful, even when you don't see these text strings.
The user can choose to regardless give control to the loaded bootblock,
or to execute the standard one contained into the Guardian code.
The opportunity to execute the loaded bootcode is given because there
are several not-standard bootblocks that actually don't contain viruses.
These are boot-intros, fast loaders, boot-menus and other custom
bootblocks, which you can find on commercial and not-commercial disks.
You'll need to execute them, if you want those disks to work properly.
If you decide to give the control to the loaded bootblock, the
screen color will become red, to remind you that you've chosen the
dangerous way. A copy of ExecBase is made before actually executing the
bootcode, and after the control is returned from the bootcode to
Guardian, this copy is compared to the current ExecBase.
"WARNING !!! - ExecBase was altered by bootcode !!!"
----------------------------------------------------
If they differ even by a single byte, an alert is displayed, and you can
decide to restore the old copy of ExecBase into its place, overwriting
the changes made by the bootcode. If you get this alert, you could
have executed the 'BYTE BANDIT' virus. Restoring the old
ExecBase will overwrite the changes made to the Vertical Blanking
Interrupt vector by the virus, and also its entry in the Resident
Modules table. This way, the virus won't freeze the machine (because it
has been removed from VBlanking interrupt) and won't survive next reset
(because its ResModules entry has been removed). But there is still a
problem. During its execution time, this virus alters the trackdisk
device library's offset table, so that the virus itself will be called
each time the computer accesses a new disk (each time there's a
read/write command starting from block 0). So you'll still get your
disk infected by simply inserting them into any drive. To solve this
problem you can simply reset the machine. This will force the offset
table to be rebuilt, and since the virus has been removed from the
ResModules table, it will be flushed completely from memory.
The old 'SCA' virus will also cause this alert to appear, because it
changes the contents of the CoolCapture vector, which is contained in
the ExecBase. Simply restoring the old ExecBase will completely remove
this virus, and no further action is required.
If you choose not to restore the old ExecBase, Guardian could be removed
from the ResModules table ('BYTE BANDIT' virus will surely do it, while
'SCA' one will pacifically cohabit) and you would be responsible of what
could happen later.
"WARNING !!! - THIS IS NOT A STANDARD BOOTBLOCK !!!"
----------------------------------------------------
If you choose not to give the control to the loaded bootblock, the
screen color will become white as usual, and you are given the
opportunity of installing the disk with the standard bootblock.
"Shall I replace IT with a STANDARD BOOTBLOCK ?"
------------------------------------------------
If the bootblock contains a virus, you should use this opportunity to
replace it with the standard one.
************************************************************************
WARNING! Do not install the original disk, unless you have a backup
copy or unless you are absolutely sure of what you are doing. Some
commercial programs come with a not-standard bootblock (fast-load,
intros, etc.) and you may be no more able to use those disks/programs
once that the original bootblock is overwritten with the standard one.
************************************************************************
"Disk is write-protected. Shall I retry ?"
-------------------------------------------
An additional alert is displayed if the disk is write protected.
Load and use of Guardian
------------------------
Again, the best thing to do is to use this ** SAFE ** disk for the first
boot, just after the computer is turned on (and after the Kickstart disk
has been loaded into the A1000, of course !), before inserting ANY other
boot disk into the internal drive. If you NEVER remove this disk's
write protection, you'll be sure that NO virus can place itself here,
and when you are in doubt about any of your boot disks, you'll just have
to turn off and on the computer and use this disk first. There had been
rumours about some new virus, writing also on write protected disks.
That's definitely NOT POSSIBLE. The last word about write protection is
left to the floppy drive itself, and there's no way to fool it. It is
possible to force the computer (the software) to believe the disk is not
write protected. This way you could 'perform' write operations on write
protected disks, and the drive would behave as if it were actually
writing on those disks, but at the end you would find their contents
unchanged. This would let you do some innocent jokes, but nothing else.
After you've removed the viruses from your disks, you could copy
Guardian into their C directories, and call it from their
startup-sequences.
Guardian should be launched in the first place of the startup-sequence,
because of its unusual method of initialization. When it's called, it
looks in the ResModules table to see if it's already there. If this is
not true (such as if it's launched for the first time), Guardian
installs itself in memory and reset the machine, to force the reset code
to build the ResModules table again.
From now on, you don't need to launch Guardian again, because it's
mounted in a Resident Module, and therefore the reset code takes care of
it, through reset and system crashes. Guardian will survive any number
of them, until the machine is forced to do a cold-start, or until a
malfunctioning program trashes its memory area. A label on the boot
screen will inform the user whether and which version is currently
installed.
When Guardian is launched and finds itself in the ResTable, it outputs
an announcement in the initial cli and exits smoothly.
Guardian installs itself in a 'kind' way, saving the vectors that KickTagPtr
and KickMemPtr may contain, but can't distinguish between a good and a bad
boy. Thus, I suggest that you launch Guardian as soon as you turn your
computer on, before any virus has the chance of installing itself into your
memory.
To give viruses no chance at all, I've written Guardian v1.1r, which is
installed into the Kickstart disk directly by the Creator program,
in place of the never-used Debug() function (use it on a COPY of your
original KS 1.2 disk!). If you own an A1000, I strongly suggest to use
v1.1r, instead of v1.1, because of two major benefits:
1) it's in the Kickstart disk, so you don't need to place it anywhere else.
2) it's active BEFORE ANY bootable disk is used, so it's SAFEST.
There is no chance it can be fooled by an already active virus, so you
don't need to care about the disk you are using for the first boot.
The only way to 'fool' it, is by passing control (execute the code) to a
virus bootblock ('byte bandit' virus, for example).
So, always be sure of what you are doing when you decide to give control
to a suspect bootblock, especially when you get the alert of the 'altered
ExecBase'.
The only drawback is that Exec function Debug() no longer exists.
If you call this function, the computer will reset.
In Guardian v1.1r I've used the memory space of the "AMIGA WORKBENCH" text,
on the disk label in the 'hand+disk' bootscreen, for the Guardian label.
Since I hardly boot with the original 'Workbench' disk, I didn't shed a
single tear for this change. 8-)
Version 1.1 of Guardian was developed to work on A500/1000/2000, (version
1.1r works on A1000 only), with release 1.2 of Kickstart (v33.180).
*** July 14th, 1988 change to this instruction file
---------------------------------------------------
I used to ask for a small contribution at this point. Please consider this
version of the program absolutely free of any charge. If you want to
support further developments of this program, please note that version 1.2
and 1.2r (sorry, no more freely copyable and redistributable) are already
available from the author or from Transactor (UK) (and shortly also from
Transactor Pub., Canada) at the cost of a Public Domain disk, which is 8000
italian lire, 3 english pounds or 6 USD.
Guardian v1.2 has been greatly enhanced, both in terms of security and of
versatility.
If you have any comment or suggestion, please let me know what you think.
Thanks!
Leonardo Fei
via A. Fava 6
20125 Milano
Italy
BIX: LFEI